<!DOCTYPE html>
<html>
<head>
	<title></title>
	<!-- 导入 vue -->
	 <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">
	<!-- {{msg}} -->
	<hr>
	<input type="text" name="" v-model="todo"> <button v-on:click="add">新增</button>
	<hr>
	<ul>
		<li v-for='item in todos'>{{item}}</li>

	</ul>
</div>
</body>
<script type="text/javascript">
	var vm = new Vue({
		el: '#app',
		data: {
			todos: ['1','2','3'],
			todo:''
		},
		methods: {
			add: function(){
				this.todos.push(this.todo)
				this.todo=''
			}
		}
	})
</script>
</html>